from instance import instance
from graph import graph
import networkx as nx

class edge:
  def __init__(self,gr,ins):
    self.g = graph(gr)
    self.g.toNum()
    self.ins = instance(ins)

  def edges(self,k):
    for kk in self.ins.getSome(k):
      nb = []
      for n in self.g.G.in_edges(kk):
        nb.append(n[0])
      print(kk,nb)

def main():
  e = edge("../test_flatten.g","../test_flatten.ins")
  e.edges("FDSE")
if __name__ == '__main__':
  main()